.class public final Lcom/ninesky/browser/view/bs;
.super Landroid/widget/LinearLayout;


# instance fields
.field private a:Landroid/view/LayoutInflater;

.field private b:Lcom/ninesky/browser/BrowserActivity;

.field private c:Landroid/webkit/WebView;

.field private d:I

.field private final e:Landroid/webkit/WebViewClient;

.field private f:Z

.field private g:I

.field private h:F


# direct methods
.method public constructor <init>(Lcom/ninesky/browser/BrowserActivity;)V
    .locals 3

    const/4 v2, -0x1

    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    new-instance v0, Lcom/ninesky/browser/view/ab;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/view/ab;-><init>(Lcom/ninesky/browser/view/bs;)V

    iput-object v0, p0, Lcom/ninesky/browser/view/bs;->e:Landroid/webkit/WebViewClient;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/ninesky/browser/view/bs;->f:Z

    iput v2, p0, Lcom/ninesky/browser/view/bs;->g:I

    iput-object p1, p0, Lcom/ninesky/browser/view/bs;->b:Lcom/ninesky/browser/BrowserActivity;

    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/view/bs;->a:Landroid/view/LayoutInflater;

    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->a:Landroid/view/LayoutInflater;

    const v1, 0x7f030007

    invoke-virtual {v0, v1, p0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v0, v2, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/view/bs;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->b:Lcom/ninesky/browser/BrowserActivity;

    invoke-static {v0}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I

    move-result v0

    iput v0, p0, Lcom/ninesky/browser/view/bs;->d:I

    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/Locale;->getCountry()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v1

    const v0, 0x7f0c0016

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/view/bs;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/webkit/WebView;

    iput-object v0, p0, Lcom/ninesky/browser/view/bs;->c:Landroid/webkit/WebView;

    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->c:Landroid/webkit/WebView;

    iget-object v2, p0, Lcom/ninesky/browser/view/bs;->e:Landroid/webkit/WebViewClient;

    invoke-virtual {v0, v2}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    const-string v0, "cn"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->c:Landroid/webkit/WebView;

    const-string v1, "file:///android_asset/navi_cn.html"

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->c:Landroid/webkit/WebView;

    const-string v1, "file:///android_asset/navi_us.html"

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_0
.end method

.method static synthetic a(Lcom/ninesky/browser/view/bs;)Lcom/ninesky/browser/BrowserActivity;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->b:Lcom/ninesky/browser/BrowserActivity;

    return-object v0
.end method


# virtual methods
.method public final onConfigurationChanged(Landroid/content/res/Configuration;)V
    .locals 2

    iget-object v0, p1, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    invoke-virtual {v0}, Ljava/util/Locale;->getCountry()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v0

    const-string v1, "cn"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->c:Landroid/webkit/WebView;

    const-string v1, "file:///android_asset/navi_cn.html"

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->c:Landroid/webkit/WebView;

    const-string v1, "file:///android_asset/navi_us.html"

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public final onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 5

    const/4 v2, -0x1

    const/4 v4, 0x1

    const/4 v3, 0x0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    iget-boolean v1, p0, Lcom/ninesky/browser/view/bs;->f:Z

    if-eqz v1, :cond_0

    move v0, v3

    :goto_0
    return v0

    :cond_0
    and-int/lit16 v0, v0, 0xff

    packed-switch v0, :pswitch_data_0

    :cond_1
    :goto_1
    :pswitch_0
    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->mParent:Landroid/view/ViewParent;

    iget-boolean v1, p0, Lcom/ninesky/browser/view/bs;->f:Z

    invoke-interface {v0, v1}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V

    move v0, v3

    goto :goto_0

    :pswitch_1
    iget v0, p0, Lcom/ninesky/browser/view/bs;->g:I

    if-eq v0, v2, :cond_1

    invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v0

    invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getY(I)F

    move-result v0

    iget v1, p0, Lcom/ninesky/browser/view/bs;->h:F

    sub-float v1, v0, v1

    invoke-static {v1}, Ljava/lang/Math;->abs(F)F

    move-result v1

    float-to-int v1, v1

    iget v2, p0, Lcom/ninesky/browser/view/bs;->d:I

    if-le v1, v2, :cond_1

    iput-boolean v4, p0, Lcom/ninesky/browser/view/bs;->f:Z

    iput v0, p0, Lcom/ninesky/browser/view/bs;->h:F

    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->mParent:Landroid/view/ViewParent;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/view/bs;->mParent:Landroid/view/ViewParent;

    invoke-interface {v0, v4}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V

    goto :goto_1

    :pswitch_2
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    iput v0, p0, Lcom/ninesky/browser/view/bs;->h:F

    invoke-virtual {p1, v3}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v0

    iput v0, p0, Lcom/ninesky/browser/view/bs;->g:I

    goto :goto_1

    :pswitch_3
    iput-boolean v3, p0, Lcom/ninesky/browser/view/bs;->f:Z

    iput v2, p0, Lcom/ninesky/browser/view/bs;->g:I

    goto :goto_1

    :pswitch_4
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    const v1, 0xff00

    and-int/2addr v0, v1

    shr-int/lit8 v0, v0, 0x8

    invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v1

    iget v2, p0, Lcom/ninesky/browser/view/bs;->g:I

    if-ne v1, v2, :cond_1

    if-nez v0, :cond_2

    move v0, v4

    :goto_2
    invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getX(I)F

    move-result v1

    iput v1, p0, Lcom/ninesky/browser/view/bs;->h:F

    invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v0

    iput v0, p0, Lcom/ninesky/browser/view/bs;->g:I

    goto :goto_1

    :cond_2
    move v0, v3

    goto :goto_2

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_2
        :pswitch_3
        :pswitch_1
        :pswitch_3
        :pswitch_0
        :pswitch_0
        :pswitch_4
    .end packed-switch
.end method
